package cn.itcast.dagger_demo;

import cn.itcast.dagger_demo.bean.Data;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by Administrator on 2016/8/3.
 */
public interface TestResponse {

    @GET("/p2p/TestServlet")
    public <ResData extends Data> Call<ResData> getTestData();

    // Caused by: java.lang.IllegalArgumentException: @Field parameters can only be used with form encoding. (parameter #1)
    @FormUrlEncoded
    @POST("/market/cart")
    public <ResData extends Data> Call<ResData> getCartData(@Field("sku") String sku);

}
